<?php

class Application_Form_choixstat extends Zend_Form
{
	
    public function init()
    { 
    	
    	$semestre = new Zend_Form_Element_Select("Semestre");
    	$semestre->setMultiOptions(array('0'=>'Choisir semestre', '1' => 'Semestre1', '2' => 'Semestre2', '3' => 'Semestre3'));
    	$semestre->setLabel("Semestre :");
    	$semestre->setAttrib("ondblclick", "AjaxLoading('geteltform',this.value,'semestre')");
    	/*$semestre->setDecorators(array(
			array('ViewHelper', array('tag'   => 'div', "class"=>"controls")),
			array('Label' , array(  "class"=>"control-label")),
			'Errors'
	));*/
    	
    	$anneeuniv = new Zend_Form_Element_Select("anneeuniv");
    	$anneeuniv->setMultiOptions(array('0'=>'Choisir annee universitaire', '1' => '2010/2011', '2' => '2011/2012', '3' => '2012/2013'));
    	$anneeuniv->setLabel("Année universitaire :");
    	$anneeuniv->setAttrib("ondblclick", "AjaxLoading('geteltform',this.value,'anneeuniv')");
    	/*$anneeuniv->setDecorators(array(
    			array('ViewHelper', array('tag'   => 'div', "class"=>"controls")),
    			array('Label' , array(  "class"=>"control-label")),
    			'Errors'
    	));*/
    	
    	
    	$time = new Zend_Form_Element_Radio("time");
    	$time->setMultiOptions(array('1'=>'Hebdomadaire', '2' => 'Semestrielle', '3' => 'Instantannée'));
    	$time->setName('choixtime');
    	
    	/*$submit = new Zend_Form_Element_submit("Valider");
    	$submit->setAttrib('class', 'btn btn-primary');
    	$submit->setAttrib('value','Valider');
    	$submit->setAttrib('data-toggle','modal');
    	$submit->setAttrib('href','#infos');*/
    	
    	
    	$this->addElements(array($anneeuniv, $semestre,$time));
    	$this->setElementDecorators(array(
    			array('ViewHelper', array('tag'   => 'div', "class"=>"controls")),
    			array('Label' , array(  "class"=>"control-label")),
    			'Errors',
    			new Zend_Form_Decorator_HtmlTag(array(
    					'tag'   => 'div', "class"=>"control-group"
    			))
    	));
    	
    }
}